<html>
	{% include "../common_head.html" %}
	<body>
	{% include "../common_menus.html" %}
	<div id="content">
		<div id="rakontu_form_style" class="rakontu_form">
		<form action="/{{dir_curate}}/{{url_flags}}?{{rakontu.urlQuery}}" method="post">
		
		{% if changes_saved %}
			<div class="message">{{template_changes_saved}}</div>
		{% endif %}
							
			<h3>{{template_flagged}} {{template_entries|lower}} {{"flagging_items_for_removal"|info}}</h3>
			{% if entries %}
				<fieldset>
		      	<table border="0" cellpadding="4" cellspacing="0">
		      	<tr>
		      		<th>{{template_unflag}}? {{"unflag_item"|tip}}</th>
		      		<th>{{template_entry}}</th>
		      		<th>{{template_type}}</th>
		      		<th>{{template_linked_to}}</th>
		      		<th>{{template_first_part_of_text}}</th>
		      		<th>{{template_contributor}}</th>
		      		<th>{{template_flag_comment}}</th>
		      		{% if current_member.isManagerOrOwner %} 
		      			<th>{{template_remove}}?{{"removing_flagged_items"|caution}}</th> 
		      		{% else %}  
		      			<th>{{template_notify}}? {{"flag_notifications"|caution}}</th> 
		      		{% endif %}
	      		</tr>
	      		{% for entry in entries %}
	  				<tr>
	  				<td width="80">
	  					<input type="checkbox" name="unflag|{{entry.key}}" value="yes" id="unflag|{{entry.key}}"/>
						<label for="unflag|{{entry.key}}">{{template_unflag}}</label>
	  				</td>	  				
	  				<td>{{entry.linkString}}</td>
	  				<td>{{entry.typeForDisplay}}</td>
	  				<td>
	  				{% for link in entry.getIncomingLinks %}
	  					<p>{{link.linkStringWithFromItem}}</p>
	  				{% endfor %}&nbsp;
	  				</td>
	  				<td>{{entry.text_formatted|upTo:current_member.shortDisplayLength|orNbsp}}</td>
	  				<td>
						{% if entry.attributedToMember %}
								{% if entry.creator.active %}
									{{entry.creator.linkString}}
									{% ifequal entry.creator.key current_member.key %}
										 ({{template_you}})
									{% endifequal %}
								{% else %}
									{{template_the_former_member}} "{{entry.creator.nickname}}"
								{% endif %}
						{% else %}
							{% if entry.character.active %}
								{{entry.character.linkString}}
							{% else %}
								{{template_the_former_character}} "{{entry.character.name}}"
							{% endif %}
						{% endif %}
	  				</td>
	  				<td><input type="text" name="flagComment|{{entry.key}}" value="{{entry.flagComment|orNothing}}" maxlength="{{maxlength_subject_or_comment}}"></td>
	  				<td width="80">
	  				{% if current_member.isManagerOrOwner %}
	  						<input type="checkbox" name="remove|{{entry.key}}" value="yes" id="remove|{{entry.key}}"/>
							<label for="remove|{{entry.key}}">{{template_remove}}</label>
	  				{% else %}
	  						<input type="checkbox" name="notify|{{entry.key}}" value="yes" id="notify|{{entry.key}}"/>
							<label for="notify|{{entry.key}}">{{template_notify}}</label>
	  				{% endif %}	
	  				</td>	  				
	  				</tr>
	      		{% endfor %}
		      	</table>
	      		</fieldset>
	      	{% else %}
	      		<ul><li class="nobullet">{{term_none}}</li></ul>
	      	{% endif %}
	      	
			<h3>{{template_flagged}} {{template_annotations|lower}}</h3>
			{% if annotations %}
				<fieldset>
		      	<table border="0" cellpadding="4" cellspacing="0">
		      	<tr>
		      		<th>{{template_unflag}}?</th>
		      		<th>{{template_entry}}</th>
		      		<th>{{template_type}}</th>
		      		<th>{{template_content}}</th>
		      		<th>{{template_contributor}}</th>
		      		<th>{{template_flag_comment}}</th>
		      		{% if current_member.isManagerOrOwner %} 
		      			<th>{{template_remove}}?</th> 
		      		{% else %}  
		      			<th>{{template_notify}}?</th> 
		      		{% endif %}
	      		</tr>
	      		{% for annotation in annotations %}
	  				<tr>
	  				<td>
	  					<input type="checkbox" name="unflag|{{annotation.key}}" value="yes" id="unflag|{{annotation.key}}"/>
						<label for="unflag|{{annotation.key}}">{{template_unflag}}</label>
	  				</td>	  				
	  				<td>{{annotation.entryLinkString}}</td>
	  				<td>{{annotation.typeForDisplay}}</td>
	  				<td>
	  				{% if annotation.isComment or annotation.isRequest %}
	  					{{annotation.linkString|orNbsp}}
	  				{% else %}
	  					{{annotation.displayString|orNbsp}}
	  				{% endif %}
	  				{% if annotation.isNudge %}
	  					{% if annotation.shortString and current_member.isManagerOrOwner %}
		  						<p><input type="checkbox" name="removeComment|{{annotation.key}}" value="yes" id="removeComment|{{annotation.key}}"/>
								<label for="removeComment|{{annotation.key}}">{{template_remove}} {{template_comment_only}}</label></p>
						{% endif %}
	  				{% endif %}
	  				{% if annotation.isRequest %}
	  					{% if annotation.completionCommentIfRequest and current_member.isManagerOrOwner %}
		  						<p><input type="checkbox" name="removeComment|{{annotation.key}}" value="yes" id="removeComment|{{annotation.key}}"/>
								<label for="removeComment|{{annotation.key}}">{{template_remove}} {{template_comment_only}}</label></p>
						{% endif %}
	  				{% endif %}
	  				</td>
	  				<td>
						{% if annotation.attributedToMember %}
								{% if annotation.creator.active %}
									{{annotation.creator.linkString}}
									{% ifequal annotation.creator.key current_member.key %}
										 ({{template_you}})
									{% endifequal %}
								{% else %}
									{{template_the_former_member}} "{{annotation.creator.nickname}}"
								{% endif %}
						{% else %}
							{% if annotation.character.active %}
								{{annotation.character.linkString}}
							{% else %}
								{{template_the_former_character}} "{{annotation.character.name}}"
							{% endif %}
						{% endif %}
	  				</td>
	  				<td><input type="text" name="flagComment|{{annotation.key}}" value="{{annotation.flagComment|orNothing}}" maxlength="{{maxlength_subject_or_comment}}"></td>
	  				<td>
	  				{% if current_member.isManagerOrOwner %}
	  						<input type="checkbox" name="remove|{{annotation.key}}" value="yes" id="remove|{{annotation.key}}"/>
							<label for="remove|{{annotation.key}}">{{template_remove}}</label>
	  				{% else %}
	  						<input type="checkbox" name="notify|{{annotation.key}}" value="yes" id="notify|{{annotation.key}}"/>
							<label for="notify|{{annotation.key}}">{{template_notify}}</label>
	  				{% endif %}	
	  				</tr>
	      		{% endfor %}
		      	</table>
		      	</fieldset>
	      	{% else %}
	      		<ul><li class="nobullet">{{term_none}}</li></ul>
	      	{% endif %}
      	
			<h3>{{template_flagged}} {{template_answers|lower}}</h3>
			{% if answers %}
				<fieldset>
		      	<table border="0" cellpadding="4" cellspacing="0">
		      	<tr>
		      		<th>{{template_unflag}}?</th>
		      		<th>{{template_entry}}</th>
		      		<th>{{template_question}}</th>
		      		<th>{{template_answer}}</th>
		      		<th>{{template_contributor}}</th>
		      		<th>{{template_flag_comment}}</th>
		      		{% if current_member.isManagerOrOwner %} 
		      			<th>{{template_remove}}?</th> 
		      		{% else %}  
		      			<th>{{template_notify}}?</th> 
		      		{% endif %}
	      		</tr>
	      		{% for answer in answers %}
	  				<tr>
	  				<td>
	  					<input type="checkbox" name="unflag|{{answer.key}}" value="yes" id="unflag|{{answer.key}}"/>
						<label for="unflag|{{answer.key}}">{{template_unflag}}</label>
	  				</td>	  				
	  				<td>{{answer.referent.linkString}}</td>
	  				<td>{{answer.question.text}}</td>
	  				<td>{{answer.displayStringShort}}</td>
	  				<td>
						{% if answer.attributedToMember %}
								{% if answer.creator.active %}
									{{answer.creator.linkString}}
									{% ifequal answer.creator.key current_member.key %}
										 ({{template_you}})
									{% endifequal %}
								{% else %}
									{{template_the_former_member}} "{{answer.creator.nickname}}"
								{% endif %}
						{% else %}
							{% if answer.character.active %}
								{{answer.character.linkString}}
							{% else %}
								{{template_the_former_character}} "{{answer.character.name}}"
							{% endif %}
						{% endif %}
	  				</td>
	  				<td><input type="text" name="flagComment|{{answer.key}}" value="{{answer.flagComment|orNothing}}" maxlength="{{maxlength_subject_or_comment}}"></td>
	  				<td>
	  				{% if current_member.isManagerOrOwner %}
	  						<input type="checkbox" name="remove|{{answer.key}}" value="yes" id="remove|{{answer.key}}"/>
							<label for="remove|{{answer.key}}">{{template_remove}}</label>
	  				{% else %}
	  						<input type="checkbox" name="notify|{{answer.key}}" value="yes" id="notify|{{answer.key}}"/>
							<label for="notify|{{answer.key}}">{{template_notify}}</label>
	  				{% endif %}	
	  				</tr>
	      		{% endfor %}
		      	</table>
		      	</fieldset>
	      	{% else %}
	      		<ul><li class="nobullet">{{term_none}}</li></ul>
	      	{% endif %}
      	
			<h3>{{template_flagged}} {{template_links|lower}}</h3>
			{% if links %}
				<fieldset>
		      	<table border="0" cellpadding="4" cellspacing="0">
		      	<tr>
		      		<th>{{template_unflag}}?</th>
		      		<th>{{template_from|capitalize}}</th>
		      		<th>{{template_to|capitalize}}</th>
		      		<th>{{template_comment}}</th>
		      		<th>{{template_flag_comment}}</th>
		      		{% if current_member.isManagerOrOwner %} 
		      			<th>{{template_remove}}?</th> 
		      		{% else %}  
		      			<th>{{template_notify}}?</th> 
		      		{% endif %}
	      		</tr>
	      		{% for link in links %}
	  				<tr>
	  				<td>
	  					<input type="checkbox" name="unflag|{{link.key}}" value="yes" id="unflag|{{link.key}}"/>
						<label for="unflag|{{link.key}}">{{template_unflag}}</label>
	  				</td>	  				
	  				<td>{{link.itemFrom.linkString}}</td>
	  				<td>{{link.itemTo.linkString}}</td>
	  				<td>{{link.comment|orNbsp}}
	  					{% if link.comment and current_member.isManagerOrOwner %}
		  						<p><input type="checkbox" name="removeComment|{{link.key}}" value="yes" id="removeComment|{{link.key}}"/>
								<label for="removeComment|{{link.key}}">{{template_remove}} {{template_comment_only}}</label></p>
						{% endif %}
	  				</td>
	  				<td><input type="text" name="flagComment|{{link.key}}" value="{{link.flagComment|orNothing}}" maxlength="{{maxlength_subject_or_comment}}"></td>
	  				<td>
	  				{% if current_member.isManagerOrOwner %}
	  						<input type="checkbox" name="remove|{{link.key}}" value="yes" id="remove|{{link.key}}"/>
							<label for="remove|{{link.key}}">{{template_remove}}</label>
	  				{% else %}
	  						<input type="checkbox" name="notify|{{link.key}}" value="yes" id="notify|{{link.key}}"/>
							<label for="notify|{{link.key}}">{{template_notify}}</label>
	  				{% endif %}	
	  				</tr>
	      		{% endfor %}
		      	</table>
		      	</fieldset>
	      	{% else %}
	      		<ul><li class="nobullet">{{term_none}}</li></ul>
	      	{% endif %}
      	
			<h3>{{template_flagged}} {{template_filters|lower}}</h3>
			{% if filters %}
				<fieldset>
		      	<table border="0" cellpadding="4" cellspacing="0">
		      	<tr><th>{{template_unflag}}? {{"unflagging_items"|tip}}</th>
		      		<th>{{template_name}}</th>
		      		<th>{{template_linked_to}}</th>
		      		<th>{{template_words}}</th>
		      		<th>{{template_tags}}</th>
		      		<th>{{template_entry_questions}}</th>
		      		<th>{{template_member_questions}}</th>
		      		<th>{{template_created}}</th>
		      		<th>{{template_flag_comment}}</th>
		      		{% if current_member.isManagerOrOwner %} 
		      			<th>{{template_remove}}?{{"removing_flagged_items"|caution}}</th> 
		      		{% else %}  
		      			<th>{{template_notify}}?</th> 
		      		{% endif %}
	      		</tr>
	      		{% for filter in filters %}
	  				<tr>
	  				<td width="80">
	  					<input type="checkbox" name="unflag|{{filter.key}}" value="yes" id="unflag|{{filter.key}}"/>
						<label for="unflag|{{filter.key}}">{{template_unflag}}</label>
	  				</td>	  				
	  				<td>{{filter.linkString}}</td>
	  				<td>
	  				{% for link in filter.getIncomingLinks %}
	  					<p>{{link.linkStringWithFromItem}}</p>
	  				{% endfor %}&nbsp;
	  				</td>
			      	<td>
			      		{% if filter.words %}
			      			{{filter.words_anyOrAll}}: {{filter.words|join:", "}} <br/>
				      		{% for i in filter_locations|makeRangeFromListLength %}
				      			{% if filter.words_locations|listLookup:i %}
				      				{{filter_locations_display|listLookup:i}}<br/>
				      			{% endif %}
				      		{% endfor %}
			      		{% else %}
			      			&nbsp;
			      		{% endif %}
			      		</td>
			      	<td>{% if filter.tags %}
			      			{{filter.tags_anyOrAll}}: {{filter.tags|join:", "}}
			      		{% endif %}&nbsp;
			      		</td>
			      	<td>
			      		{% for ref in filter.getEntryQuestionRefs %}
			      			{{ref.question.text}} {{ref.answer}}<br/>
			      		{% endfor %}
			      		&nbsp;
			      		</td>
			      	<td>
			      		{% for ref in filter.getCreatorQuestionRefs %}
			      			{{ref.question.text}} {{ref.answer}}<br/>
			      		{% endfor %}
			      		&nbsp;
			      		</td>
					<td>
						{% if current_member.timeFormat %}
							{{filter.created|timeZone:current_member.timeZoneName|time:current_member.timeFormat}}
						{% endif %}
					    {{filter.created|timeZone:current_member.timeZoneName|date:current_member.dateFormat}}<br/>
					 </td>
	  				<td><input type="text" name="flagComment|{{filter.key}}" value="{{filter.flagComment|orNothing}}" maxlength="{{maxlength_subject_or_comment}}"></td>
	  				<td width="80">
	  				{% if current_member.isManagerOrOwner %}
	  						<input type="checkbox" name="remove|{{filter.key}}" value="yes" id="remove|{{filter.key}}"/>
							<label for="remove|{{filter.key}}">{{template_remove}}</label>
	  				{% else %}
	  						<input type="checkbox" name="notify|{{filter.key}}" value="yes" id="notify|{{filter.key}}"/>
							<label for="notify|{{filter.key}}">{{template_notify}}</label>
	  				{% endif %}	
	  				</td>	  				
	  				</tr>
	      		{% endfor %}
		      	</table>
	      		</fieldset>
	      	{% else %}
	      		<ul><li class="nobullet">{{term_none}}</li></ul>
	      	{% endif %}
	      	
      	{% if entries or annotations or answers or links or filters %}
			<p>&nbsp; </p>
		    <center>
		    {% if current_member.isManagerOrOwner %}
		    	<p><i><b>{{template_remove_warning}}</b></i></p>
		    	<input type="submit" name="submitChanges" value="{{button_make_selected_changes}}" class="button">&nbsp; 
		    {% else %}
		    	<input type="submit" name="submitChanges" value="{{button_make_selected_changes}}" class="button">&nbsp; 
		    {% endif %}
		{% endif %}
		</form>	
		</div>
	</div>
	{% include "../common_footer.html" %}
	</body>
</html>
